﻿using Net.System;

namespace Net.Entities
{
    /// <summary>
    /// 实体时间类型
    /// </summary>
    public static class Time
    {
        public static long _time;
        public static long _deltaTime = 1000 / 30;

        public static float time => _time * 0.001f;
        public static float deltaTime = 1f / 30f;

        static Time()
        {
            ThreadManager.Event.AddEvent("Time.Update", _deltaTime, Update);
        }

        private static bool Update()
        {
            _time += _deltaTime;
            return true;
        }
    }
}